package cn.wizzer.app.sys.modules.models;

import cn.wizzer.framework.base.model.BaseModel;
import lombok.Data;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;

import java.io.Serializable;

/**
 * 后台IP白名单
 */
@Table("sys_ip_white_list")
@Data
public class SysIpWhiteList extends BaseModel implements Serializable {
    @Column
    @Name
    @ColDefine(type = ColType.VARCHAR, width = 32)
    @PrevInsert(els = {@EL("uuid()")})
    private String id;


    @Column
    @ColDefine(type = ColType.VARCHAR, width = 15)
    private String ip;


    @Column
    @ColDefine(type = ColType.BOOLEAN)
    @Default("0")
    private boolean disabled;

    @Column
    @Comment("创建时间")
    @PrevInsert(els = @EL("$me.now()"))
    private Long ctAt;
}
